package de.tum.datatypes;

import java.util.List;
import java.util.Set;

/**
 * Represent a MultipleChoiceQuestion
 * @author Rupert
 *
 */
public class MultipleChoiceQuestion {
	private String question;
	private List<String> answerPossibilities;
	private boolean[] correctAnswers;
	
	public MultipleChoiceQuestion(String question, List<String> answers, boolean[] correctAnswers){
		this.setQuestion(question);
		this.setAnswers(answers);
		this.setCorrectAnswers(correctAnswers);
	}
	
	
	public void addCorrectAnswer(int answer){
		correctAnswers[answer] = true;
	}
	
	public void removeCorrectAnswer(int answer){
		correctAnswers[answer] = false;
	}

	public void addAnswerPossibility(String answerPossibility){
		answerPossibilities.add(answerPossibility);
	}
	
	public void removeAnswerPossibility(String answerPossibility){
		answerPossibilities.remove(answerPossibility);
	}
	
	/*
	 * GETTERS & SETTERS
	 */
	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public List<String> getAnswers() {
		return answerPossibilities;
	}

	public void setAnswers(List<String> answers) {
		this.answerPossibilities = answers;
	}

	public boolean[] getCorrectAnswers() {
		return correctAnswers;
	}

	public void setCorrectAnswers(boolean[] correctAnswers) {
		this.correctAnswers = correctAnswers;
	}
	
	
}
